package com.example.pkmedical.Activity.weight.weightdevice;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.example.pkmedical.APP.MyApp;
import com.example.pkmedical.Base.BaseActivity;
import com.example.pkmedical.MainActivity;
import com.example.pkmedical.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class WeightGoBeyondActivity extends BaseActivity {

    @BindView(R.id.weight_beyoung_button_ok)
    Button weightBeyoungButtonOk;
    @BindView(R.id.weight_beyoung_button_cancle)
    Button weightBeyoungButtonCancle;
    @BindView(R.id.weight_beyoung_text)
    TextView weightBeyoungText;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_weightgobeyong);
        ButterKnife.bind(this);
    }

    @Override
    public void initData() {

    }

    @Override
    public void initView() {
        Intent intent = getIntent();
        if (null != intent) {
            int numType = intent.getIntExtra("small_or_big", 1);
            switch (numType) {
                case 1:
                    weightBeyoungText.setText(getText(R.string.weight_so_small));
                    break;
                case 2:
                    weightBeyoungText.setText(getText(R.string.weight_so_big));
                    break;
            }
        }
    }

    @Override
    public void initPresenter() {

    }

    @Override
    public void showDialog(String... msg) {

    }

    @OnClick({R.id.weight_beyoung_button_ok, R.id.weight_beyoung_button_cancle})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.weight_beyoung_button_ok:
                startActivity(new Intent(MyApp.getAppContext(), WeightAgainActivity.class));
                WeightGoBeyondActivity.this.finish();
//                Intent intent = new Intent();
//                intent.putExtra("jumpYtpe", 0);
//                intent.setClass(MyApp.getAppContext(), WeightPineBedActivity.class);
//                startActivity(intent);
//

                break;
            case R.id.weight_beyoung_button_cancle:
                WeightGoBeyondActivity.this.finish();
                break;
        }
    }
}
